package com.global.college.ui.banner;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.global.college.CollegeApplication;
import com.global.college.R;


public class CustomViewHolder implements BannerViewHolder<CustomData> {

    private ImageView iv_background;

    @Override
    public View createView(Context context) {
        View view = LayoutInflater.from(context).inflate(R.layout.banner_item, null);
        iv_background = view.findViewById(R.id.iv_background);
        return view;
    }
    @Override
    public void onBind(Context context, int position, CustomData data) {
        Glide.with(CollegeApplication.getContext()).load(data.getImgId()).into(iv_background);
    }
}